﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace WCS.Infrastructure.Dto.Request.Epaylinks
{
    /// <summary>
    /// 结算账户信息
    /// </summary>
    public class EpaylinksSettlementAccountInfo
    {
        /// <summary>
        /// 结算方式(1：自劢提现； 2：手劢提现)
        /// </summary>
        public string SettleTarget { get; set; }

        /// <summary>
        /// 结算账户类型(1：对公败户 2：法人败户 3：授权对公 4：授权对私)
        /// </summary>
        public string SettleAccountType { get; set; }

        /// <summary>
        /// 结算账户号，长度最大为 40 位
        /// </summary>
        [MaxLength(40)]
        public string SettleAccountNo { get; set; }

        /// <summary>
        /// 结算账户名，长度最大为 40 位
        /// </summary>
        [MaxLength(40)]
        public string? SettleAccount { get; set; }

        /// <summary>
        /// 开户银行，填写银行名称，最大长度为 100 位
        /// </summary>
        [MaxLength(100)]
        public string OpenBank { get; set; }

        /// <summary>
        /// 开户支行，当结算账户类型为“对公账户”时必填，最大长度为 60 位
        /// </summary>
        [MaxLength(60)]
        public string? OpenSubBank { get; set; }

        /// <summary>
        /// 开户行联行号，当结算账户类型为“对公账户”时必填，最大长度为 20 位
        /// </summary>
        [MaxLength(20)]
        public string? OpenBankCode { get; set; }

        /// <summary>
        /// 结算人身份证正面，当结算账户类型为授权对私时必需，存储文件标识（fileID），限图片
        /// </summary>
        [MaxLength(40)]
        public string? SettleCertFrontPhoto { get; set; }
        public string? SettleCertFrontPhotoURL { get; set; }

        /// <summary>
        /// 结算人身份证反面，当结算账户类型为授权对私时必需，存储文件标识（fileID），限图片
        /// </summary>
        [MaxLength(40)]
        public string? SettleCertBackPhoto { get; set; }
        public string? SettleCertBackPhotoURL { get; set; }

        /// <summary>
        /// 银行卡正面照，当结算账户类型为授权对私时必需，存储文件标识（fileID），限图片
        /// </summary>
        [MaxLength(40)]
        public string? BankCardPhotoFront { get; set; }
        public string? BankCardPhotoFrontURL { get; set; }

        /// <summary>
        /// 银行卡背面照，存储文件标识（fileID），限图片
        /// </summary>
        [MaxLength(40)]
        public string? BankCardPhotoBack { get; set; }
        public string? BankCardPhotoBackURL { get; set; }

        /// <summary>
        /// 银行预留手机号，最大长度为 20 位
        /// </summary>
        [MaxLength(20)]
        public string? OpenBankReservePhone { get; set; }

        /// <summary>
        /// 附言，最大长度为 200 位
        /// </summary>
        [MaxLength(200)]
        public string? Postscript { get; set; }

        /// <summary>
        /// 摘要
        /// </summary>
        [MaxLength(100)]
        public string? Summary { get; set; }

        /// <summary>
        /// 付款用途和事由，非同名卡时必填，最大长度为 100 位
        /// </summary>
        [MaxLength(100)]
        public string? Purpose { get; set; }

        /// <summary>
        /// 开户意愿书照片，当满足特定条件时必需，存储文件标识（fileID），限图片
        /// </summary>
        [MaxLength(40)]
        public string? AccountIntentPhoto { get; set; }
        public string? AccountIntentPhotoURL { get; set; }

        /// <summary>
        /// 代付证明，当满足特定条件时必需，存储文件标识（fileID），限图片，限 2 张
        /// </summary>
        [MaxLength(100)]
        public string? WithdrawProofPhoto { get; set; }
        public string? WithdrawProofPhotoURL { get; set; }

        /// <summary>
        /// 转账功能申请书，当满足特定条件时必需，存储文件标识（fileID）
        /// </summary>
        [MaxLength(40)]
        public string? TransferApplyAttachment { get; set; }
        public string? TransferApplyAttachmentURL { get; set; }

        /// <summary>
        /// 结算账户附件
        /// </summary>
        [MaxLength(40)]
        public string? SettleAttachment { get; set; }
        public string? SettleAttachmentURL { get; set; }

        /// <summary>
        /// 收款方营业执照图片，当满足特定条件时必填，存储文件标识（fileID），限图片
        /// </summary>
        [MaxLength(40)]
        public string? SettleLicensePhoto { get; set; }
        public string? SettleLicensePhotoURL { get; set; }


        /// <summary>
        /// 默认结算账户0：否（默讣）；1：是当有多个结算卡被设置为默认时，最后提交的作为实际默认卡
        /// </summary>
        [MaxLength(2)]
        public string? IsDefault { get; set; } = "1";
    }




    /// <summary>
    /// 结算方式
    /// </summary>
    public enum SettlementTarget
    {
        /// <summary>
        /// 自动提现
        /// </summary>
        AutomaticWithdrawal = 1,
        /// <summary>
        /// 手动提现
        /// </summary>
        ManualWithdrawal = 2
    }

    /// <summary>
    /// 结算账户类型
    /// </summary>
    public enum SettlementAccountType
    {
        /// <summary>
        /// 对公账户
        /// </summary>
        CorporateAccount = 1,
        /// <summary>
        /// 法人账户
        /// </summary>
        LegalPersonAccount = 2,
        /// <summary>
        /// 授权对公账户
        /// </summary>
        AuthorizedCorporate = 3,
        /// <summary>
        /// 授权对私账户
        /// </summary>
        AuthorizedPersonal = 4
    }
}